﻿<UserControl x:Class="Probel.Ldoc.Views.Controls.LocalisedItemPopupView"
             
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:t="clr-namespace:Probel.Ldoc.Views.Properties"
             xmlns:tk="http://schemas.xceed.com/wpf/xaml/toolkit"
             
             mc:Ignorable="d" Width="300">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Themes/Generic.xaml"/>
                <ResourceDictionary>
                    <Style TargetType="TextBlock">
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="HorizontalAlignment" Value="Right"/>
                    </Style>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Border BorderThickness="5"
            CornerRadius="5"
            Background="#FFF4F8FC">
        <Border.Effect>
            <DropShadowEffect Color="#FFB6B6B6"/>
        </Border.Effect>
        <DockPanel Background="#FFF6F6F6">
            <Border Style="{StaticResource ToolBoxBorderStyle}"
                Margin="0,0,5,0">
                <StackPanel Orientation="Horizontal"
                    HorizontalAlignment="Right">
                    <Button Content="{x:Static t:Messages.Btn_Create}"
                        Command="{Binding CreateCommand}"
                        Style="{DynamicResource ButtonToolBoxStyle}" 
                        Click="Click_Create"
                        IsDefault="True"/>
                </StackPanel>
            </Border>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="90"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>

                <TextBlock Text="{x:Static t:Messages.Lbl_Title}"/>
                <TextBox x:Name="focused" 
                     Grid.Column="1"
                     VerticalAlignment="Center"
                     VerticalContentAlignment="Center"
                     Margin="5"
                     Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}"/>


                <TextBlock Grid.Row="1" Text="{x:Static t:Messages.Lbl_Phone}"/>
                <TextBox Grid.Row="1" Grid.Column="1"
                     VerticalAlignment="Center"
                     VerticalContentAlignment="Center"
                     Margin="5"
                     Text="{Binding Phone, UpdateSourceTrigger=PropertyChanged}"/>

                <GroupBox Grid.Row="2" Grid.ColumnSpan="2"
                      Header="{x:Static t:Messages.Gb_Address}">
                    <GroupBox.Resources>
                        <Style TargetType="TextBlock">
                            <Setter Property="Margin" Value="5"/>
                            <Setter Property="FontSize" Value="12"/>
                            <Setter Property="VerticalAlignment" Value="Center"/>
                            <Setter Property="Width" Value="60"/>
                            <Setter Property="TextAlignment" Value="Right"/>
                        </Style>
                        <Style TargetType="TextBox">
                            <Setter Property="Margin" Value="5"/>
                        </Style>
                    </GroupBox.Resources>
                    <StackPanel>
                        <DockPanel DockPanel.Dock="Top">
                            <TextBlock DockPanel.Dock="Left" Text="{x:Static t:Messages.Lbl_Street}"/>
                            <TextBox DockPanel.Dock="Right" Text="{Binding Street, UpdateSourceTrigger=PropertyChanged}"/>
                        </DockPanel>
                        <Grid DockPanel.Dock="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <DockPanel>
                                <TextBlock Text="{x:Static t:Messages.Lbl_StreetNumber}"/>
                                <TextBox Text="{Binding StreetNumber, UpdateSourceTrigger=PropertyChanged}"/>
                            </DockPanel>
                            <DockPanel Grid.Column="1">
                                <TextBlock Text="{x:Static t:Messages.Lbl_BoxNumber}" Width="Auto"/>
                                <TextBox Text="{Binding BoxNumber, UpdateSourceTrigger=PropertyChanged}" />
                            </DockPanel>
                        </Grid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <DockPanel>
                                <TextBlock Text="{x:Static t:Messages.Lbl_PostalCode}"/>
                                <TextBox Text="{Binding PostalCode, UpdateSourceTrigger=PropertyChanged}"/>
                            </DockPanel>
                            <DockPanel Grid.Column="1">
                                <TextBlock Text="{x:Static t:Messages.Lbl_City}" Width="Auto"/>
                                <TextBox Text="{Binding City, UpdateSourceTrigger=PropertyChanged}"/>
                            </DockPanel>
                        </Grid>
                    </StackPanel>
                </GroupBox>
            </Grid>
        </DockPanel>
    </Border>
</UserControl>
